home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / raytrace / rayshade / graphtal.lzh / Graphtal.Amiga / Ray.h < prev    next >
C/C++ Source or Header  |  1992-11-17  |  1KB  |  51 lines

  1. /*
  2.  * Ray.h - class definition for ray manipulations.
  3.  *
  4.  * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
  5.  *                     University of Berne, Switzerland
  6.  * All rights reserved.
  7.  *
  8.  * This software may be freely copied, modified, and redistributed
  9.  * provided that this copyright notice is preserved on all copies.
  10.  *
  11.  * You may not distribute this software, in whole or in part, as part of
  12.  * any commercial product without the express consent of the authors.
  13.  *
  14.  * There is no warranty or other guarantee of fitness of this software
  15.  * for any purpose.  It is provided solely "as is".
  16.  *
  17.  */
  18.  
  19. #ifndef Ray_H
  20. # define Ray_H
  21.  
  22. #include "Vector.h"
  23.  
  24. class TransMatrix;
  25.  
  26. //___________________________________________________________ Ray
  27.  
  28. class Ray
  29. {
  30. public:
  31.   Ray(const Vector&, const Vector&);
  32.  
  33.   real transform(const TransMatrix&);
  34.   const Vector& getOrig() const;
  35.   const Vector& getDir() const;
  36.     
  37. private:
  38.   Vector orig; // origin 
  39.   Vector dir;  // direction
  40. };
  41.  
  42. inline const Vector& Ray::getOrig() const {
  43.   return orig;
  44. }
  45.  
  46. inline const Vector& Ray::getDir() const {
  47.   return dir;
  48. }
  49.  
  50. #endif // Ray_H
  51.